package com.slz3.business.module.afterSaleManagement.aftApplyOrder.steward;

import com.slz3.business.frame.response.RR;
import com.slz3.business.frame.response.ResInfo;
import com.slz3.business.module.afterSaleManagement.aftApplyOrder.domain.AftApplyOrder;
import com.slz3.business.module.afterSaleManagement.aftApplyOrder.domain.AftApplyOrderCondition;
import org.springframework.stereotype.Component;
import org.springframework.web.reactive.function.server.ServerRequest;
import org.springframework.web.reactive.function.server.ServerResponse;
import reactor.core.publisher.Mono;

public class AftApplyOrderResAtomic extends AftApplyOrderResExecutor {

    public Mono<ServerResponse> add_$AftApplyOrderUpdateLock(ServerRequest req, AftApplyOrder aftApplyOrder) {
        return AftApplyOrderResSafeValid.add(req, aftApplyOrder) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                super.add(req, aftApplyOrder);
    }

    public Mono<ServerResponse> delete_$AftApplyOrderUpdateLock(ServerRequest req, AftApplyOrderCondition aftApplyOrderCondition) {
        return AftApplyOrderResSafeValid.delete(req, aftApplyOrderCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                super.delete(req);
    }

    public Mono<ServerResponse> modify_$AftApplyOrderUpdateLock(ServerRequest req, AftApplyOrder aftApplyOrder) {
        return AftApplyOrderResSafeValid.modify(req, aftApplyOrder) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                super.modify(req, aftApplyOrder);
    }

    public Mono<ServerResponse> info_$AftApplyOrderUpdateLock(ServerRequest req) {
        return AftApplyOrderResSafeValid.info(req) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                super.info(req);
    }

    public Mono<ServerResponse> auditSubmit_$AftApplyOrderUpdateLock(ServerRequest req, AftApplyOrderCondition aftApplyOrderCondition) {
        return AftApplyOrderResSafeValid.auditSubmit(req, aftApplyOrderCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                super.auditSubmit(req);
    }

    public Mono<ServerResponse> audit_$AftApplyOrderUpdateLock(ServerRequest req, AftApplyOrderCondition aftApplyOrderCondition) {
        return AftApplyOrderResSafeValid.audit(req, aftApplyOrderCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                super.audit(req);
    }

    public Mono<ServerResponse> auditReject_$AftApplyOrderUpdateLock(ServerRequest req, AftApplyOrderCondition aftApplyOrderCondition) {
        return AftApplyOrderResSafeValid.auditReject(req, aftApplyOrderCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                super.auditReject(req);
    }


    public Mono<ServerResponse> usingEnable_$AftApplyOrderUpdateLock(ServerRequest req, AftApplyOrderCondition aftApplyOrderCondition) {
        return AftApplyOrderResSafeValid.usingEnable(req, aftApplyOrderCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                super.usingEnable(req);
    }

    public Mono<ServerResponse> usingDisable_$AftApplyOrderUpdateLock(ServerRequest req, AftApplyOrderCondition aftApplyOrderCondition) {
        return AftApplyOrderResSafeValid.usingDisable(req, aftApplyOrderCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                super.usingDisable(req);
    }

    public Mono<ServerResponse> sync_$AftApplyOrderUpdateLock(ServerRequest req, AftApplyOrder aftApplyOrder) {
        return AftApplyOrderResSafeValid.sync(req, aftApplyOrder) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                super.sync(req, aftApplyOrder);
    }

}
